package wm;

import org.red5.server.adapter.ApplicationAdapter;
import org.red5.server.api.IConnection;
import org.red5.server.api.service.IServiceCapableConnection;

public class MyFirstApp extends ApplicationAdapter{

	
	public boolean appConnect(IConnection arg0, Object[] arg1) {

		callClient(arg0);
		
		System.out.println("client call this................");
		
		return true;
	
	} 
	
	private void callClient(IConnection conn){
		if (conn instanceof IServiceCapableConnection) {
			IServiceCapableConnection sc = (IServiceCapableConnection) conn;
			sc.invoke("clientMethod", new Object[]{"One", 1});
		}
	}

}
